package com.fairytask.event
{	
	import flash.events.Event;

	/**
	 * 聊天事件 
	 * @author Navy
	 */	
	public class ChatEvent extends Event
	{
		//客户端提示
		public static const CLIENT_ALL_SHOW_MSGINFO	:String		=	"clientAllShowMsgInfo";//聊天框和中间文字提示都显示
		public static const CLIENT_CHAT_SHOW_MSGINFO	:String		=	"clientChatShowMsgInfo";//只在聊天框显示提示
		public static const FRIEND_UI_PRIVATE_CHAT_MSG:String		=	"friendUI_ask_private_chat";
		public static const CHAT_LIST_BTN_CLICK		:String		=	"btnListClick";
		public static const	ALERT_MESSAGE			:String		=	"Alert_Message";

		public static const	BROADCAST_MESSAGE		:String		=	"Broadcast_Message";//公告喇叭
		public static const 	BROADCAST_SYSTEM_MESSAGE :String	=	"broadcast_massage_system";//系统公告消息
		//CheckBox相关事件
		public static const CHAT_LIST_CB_NOT_PIN		:String		=	"checkBoxLocalTipNotPin";//不可屏蔽 提示事件
		public static const CHAT_LIST_CB_PIN 			:String		=	"checkBoxLocalTipPin";//屏蔽 提示事件
		public static const CHAT_LIST_CB_BACK_NOT_PIN	:String		=	"localTipBackNotPin";//回到不屏蔽 提示事件
		
		private var _cbId					:int;//点击的checkBox对应的索引号
		private var _clientMsg 			:String;//聊天窗口文字格式
		private var _effectMsg				:String="";//提示效果文字格式(如果格式不一样，可以用到)
		
		public function ChatEvent(type:String,clientMsg:String,cbId:int=0,effectMsg:String="",bubbles:Boolean=false, cancelable:Boolean=false)
		{
			_cbId		=	cbId;
			_clientMsg	=	clientMsg;	
			if(effectMsg!="")
			{
				_effectMsg = effectMsg;
			}
			super(type, bubbles, cancelable);
		}
		
		override public function clone():Event
		{
			super.clone();
			return new ChatEvent(type,clientMsg,_cbId,_effectMsg);
		}
		
		public function get effectMsg():String
		{
			return _effectMsg;
		}
		
		public function get cbId():int
		{
			return _cbId;
		}
		
		public function get clientMsg():String
		{
			return _clientMsg;
		}
	}
}